package com.aimls.common;

import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class GetFileTime {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		File file =new File("D:\\temp.xml");
        Long time =file.lastModified();
        Calendar cd = Calendar.getInstance();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        cd.setTimeInMillis(time);
        String t = sdf.format(new Date(time));        
        System.out.println(cd.getTime());
        System.out.println(t);
	}

}
